You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TMtx Class > TMtx Methods > SVDSolve Method > TMtx.SVDSolve Method ([In] TVec, [In] TVec, [In] TVec, double)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TMtx.SVDSolve Method ([In] TVec, [In] TVec, [In] TVec, double)

Calculates the minimum norm solution to a real linear least squares problem.

Syntax
C#
Visual Basic
public int SVDSolve([In] TVec B, [In] TVec X, [In] TVec S, double Threshold);

Calculates the minimum norm solution to a real linear least squares problem. 

Minimize 2-norm(| b - A*x |). 

using the singular value decomposition (SVD) of the calling matrix A. A is an Rows-by-Cols matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call. The effective rank of A is determined by treating as zero those singular values which are less than Threshold times the largest singular value and is returned by the function. The S vector holds the singular values on the output.

var X,B,D: TVec; V: TMtx; begin CreateIt(X,B,D); CreateIt(V); try B.SetIt(false,[0,2,3]); V.SetIt(3,3,false,[1,2,3, 3,4,5, 6,7,7]); V.SVDSolve(B,X,D); // matrix V can be non-quadratic finally FreeIt(X,B,D); FreeIt(V); end; end;
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!